package com.liwc.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * layout
 * @author Administrator
 *
 */
@Controller
@RequestMapping(value="layout")
public class LayoutController {

	Log logger = LogFactory.getLog(LayoutController.class);
	
	
	
	/**
	 * 打开首页
	 * @param req
	 * @param resp
	 * @return
	 */
	@RequestMapping(value="layout")
	public ModelAndView layout(Model model){
		model.addAttribute("title", "用户中心");
		return new ModelAndView("layout/layout");
	}
	
	
	/**
	 * top页面
	 * @param req
	 * @param resp
	 * @return
	 */
	@RequestMapping(value="top")
	public ModelAndView top(HttpServletRequest req, HttpServletResponse resp){
		
		return new ModelAndView("layout/top");
	}
	
	/**
	 * menu页面
	 * @param req
	 * @param resp
	 * @return
	 */
	@RequestMapping(value="menu")
	public ModelAndView menu(HttpServletRequest req, HttpServletResponse resp){
		
		ModelAndView mv = new ModelAndView("layout/menu");
		return mv;
	}
	
	/**
	 * center页面
	 * @param req
	 * @param resp
	 * @return
	 */
	@RequestMapping(value="center")
	public ModelAndView center(HttpServletRequest req, HttpServletResponse resp){
		
		return new ModelAndView("layout/center");
	}
	
	/**
	 * 默认页面
	 * @param req
	 * @param resp
	 * @return
	 */
	@RequestMapping(value="myDefault")
	public ModelAndView myDefault(HttpServletRequest req, HttpServletResponse resp){
		
		return new ModelAndView("layout/myDefault");
	}
}
